"ui";

ui.layout(
    <vertical alpha="0.7">
        <button text="点击获取无障碍权限" id="getto"/>
        <button text="点击开启脚本" id="dott"/>
        <button text="点击跳转获取悬浮窗权限" id="io"/>
        <button text="关闭脚本" id="stop"/>
        
    </vertical>
);
ui.getto.on("click", () => {
    auto();
});
ui.io.on("click", () => {
    app.startActivity({
        packageName: "com.android.settings",
        className: "com.android.settings.Settings$AppDrawOverlaySettingsActivity",
        data: "package:" + context.getPackageName().toString()
    });
});
ui.stop.on("click", () => {
    exit()
})
ui.dott.on("click", () => {
    let file0="float_better.js"
    var a = threads.start(function() {
        engines.execScriptFile(file0)
    })
})
//paint.setSytle(Paint.STYLE.FILL)
//paint.setColor(colors.res);
//canvas.drawRect(0, 0, 100, 100, paint);